checkSelfPermission

open fun checkSelfPermission(@NonNull context: Context, @NonNull permission: String): Int(source)

Determine whether you have been granted a particular permission.

Return

PERMISSION_GRANTED if you have the permission, or PERMISSION_DENIED if not.

Parameters

context

context for which to check the permission.

permission

The name of the permission being checked.

See also